package org.adorsys.aderp.jpa.api.change;

/**
 * Synchronous interface to publish change records. Each entity
 * interested in publishing changes must provide an implementation
 * of this interface.
 * 
 * @author fpo
 *
 */
public class ChangeRecordPublisher {
	
	private ChangeRecordPublishingGateway changeRecordPublishingGateway;
	
	/**
	 * Instantiates and publishes the audit record
	 * @param auditRecord
	 */
	public void publish(ChangeRecord changeRecord){
		changeRecordPublishingGateway.publishChange(changeRecord);
	}

	public void setChangeRecordPublishingGateway(
			ChangeRecordPublishingGateway changeRecordPublishingGateway) {
		this.changeRecordPublishingGateway = changeRecordPublishingGateway;
	}
	
	
}
